﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

using Ssb.Logic;

namespace Ssb.ContentTypes
{
    public class Stage_Content
        : ContentType
    {
        /* public List<Bubble> ClingBubbles; // ClingBubbles are zones that the player may cling to
        public List<Rectangle> StageArea; // The stage areas are zones that the player may not pass through

        public Image BG; // The background is but a simple 1-frame image

        public Rectangle KillBounds; // Anything outside the killbounds dies
         */

        public List<String> ClingBubbles;
        public List<String> StageArea;
        public String BG;
        public String KillBounds;

        public Stage_Content()
            : base()
        {

        }

        public Stage Build(Game game)
        {
            base.Initialize(game);

            List<Bubble> cb = new List<Bubble>();
            List<Rectangle> sa = new List<Rectangle>();

            foreach(String path in ClingBubbles)
            {
                cb.Add(Game.Content.Load<Bubble_Content>(path).Build(Game));
            }

            foreach(String path in StageArea)
            {
                sa.Add(Game.Content.Load<Rectangle_Content>(path).Build(Game));
            }

            return new Stage(game, Game.Content.Load<Rectangle_Content>(KillBounds).Build(game), cb, 
                sa, Game.Content.Load<Image_Content>(BG).Build(Game));
        }
    }
}
